home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / datedres.swf / scripts / frame_4 / DoAction.as
Text File  |  2013-04-24  |  13KB  |  483 lines

  1. stop();
  2. Mouse.show();
  3. so2.start();
  4. back_frame = 4;
  5. newmenu_set();
  6. ava_makeup_int();
  7. set_menu();
  8. makeup_apply();
  9. ava_dress_re();
  10. Mouse.removeListener(mouse_up);
  11. Mouse.removeListener(mouse_down);
  12. ava_end.ava_makeup_face.select_color = 1;
  13. ava_end.makeup_eyeline0.select_color = 1;
  14. ava_end.makeup_eyeline1.select_color = 1;
  15. ava_end.ava_lip.select_color = 1;
  16. hand_show = function()
  17. {
  18.    var _l1 = this;
  19.    makeup_hand.onEnterFrame = function()
  20.    {
  21.       var _l1 = this;
  22.       _l1._x = _root._xmouse;
  23.       _l1._y = _root._ymouse;
  24.       if(_l1._y < 165 && _l1._x > 220)
  25.       {
  26.          _l1._visible = false;
  27.          Mouse.show();
  28.       }
  29.       else if(_l1._y > 320)
  30.       {
  31.          _l1._visible = true;
  32.          Mouse.hide();
  33.       }
  34.    };
  35. };
  36. makeup_pad.onRelease = function()
  37. {
  38.    so2.start();
  39.    mas_close();
  40.    makeup_set.gotoAndStop(2);
  41.    s_makeup = 0;
  42.    powder_cmaker();
  43.    makeup_hand.gotoAndStop(1);
  44.    hand_show();
  45. };
  46. makeup_pad.onRollOver = function()
  47. {
  48.    this.gotoAndPlay(2);
  49.    so2.start();
  50.    makeup_hand._visible = false;
  51.    Mouse.show();
  52. };
  53. makeup_pad.onRollOut = function()
  54. {
  55.    this.gotoAndStop(1);
  56.    if(s_makeup == 0)
  57.    {
  58.       Mouse.hide();
  59.       makeup_hand.gotoAndStop(1);
  60.       makeup_hand._visible = true;
  61.    }
  62. };
  63. mouse_down = new Object();
  64. mouse_down.onMouseDown = function()
  65. {
  66.    var _l1 = _root;
  67.    if(s_makeup == 0)
  68.    {
  69.       if(_l1._xmouse > 20 && _l1._xmouse < 220 && (_l1._ymouse > 145 && _l1._ymouse < 400))
  70.       {
  71.          so6.start();
  72.          makeup_hand.powder.gotoAndPlay(2);
  73.          if(ava_end.ava_makeup_face._currentframe != ava_end.ava_makeup_face.select_color)
  74.          {
  75.             ava_end.ava_makeup_face.gotoAndStop(ava_end.ava_makeup_face.select_color);
  76.             ava_end.ava_makeup_face._alpha = 0;
  77.          }
  78.          if(ava_end.ava_makeup_face._alpha < 100)
  79.          {
  80.             ava_end.ava_makeup_face._alpha += 10;
  81.             ava_makeups[0] = ava_end.ava_makeup_face._alpha;
  82.          }
  83.          else
  84.          {
  85.             ava_end.ava_makeup_face._alpha = 100;
  86.             ava_makeups[0] = ava_end.ava_makeup_face._alpha;
  87.          }
  88.       }
  89.    }
  90.    else if(s_makeup == 1)
  91.    {
  92.       if(_l1._xmouse > 40 && _l1._xmouse < 250 && (_l1._ymouse > 150 && _l1._ymouse < 300))
  93.       {
  94.          so6.start();
  95.          makeup_hand.back.gotoAndPlay(2);
  96.          if(ava_end.makeup_eyeline0._currentframe != ava_end.makeup_eyeline0.select_color)
  97.          {
  98.             ava_end.makeup_eyeline0.gotoAndStop(ava_end.makeup_eyeline0.select_color);
  99.             ava_end.makeup_eyeline0._alpha = 0;
  100.          }
  101.          if(ava_end.makeup_eyeline0._alpha < 100)
  102.          {
  103.             ava_end.makeup_eyeline0._alpha += 10;
  104.             ava_makeups[4] = ava_end.makeup_eyeline0._alpha;
  105.          }
  106.          else
  107.          {
  108.             ava_end.makeup_eyeline0._alpha = 100;
  109.             ava_makeups[4] = ava_end.makeup_eyeline0._alpha;
  110.          }
  111.       }
  112.    }
  113.    else if(s_makeup == 2)
  114.    {
  115.       if(_l1._xmouse > 40 && _l1._xmouse < 250 && (_l1._ymouse > 150 && _l1._ymouse < 300))
  116.       {
  117.          so6.start();
  118.          makeup_hand.point.gotoAndPlay(2);
  119.          if(ava_end.makeup_eyeline1._currentframe != ava_end.makeup_eyeline1.select_color)
  120.          {
  121.             ava_end.makeup_eyeline1.gotoAndStop(ava_end.makeup_eyeline1.select_color);
  122.             ava_end.makeup_eyeline1._alpha = 0;
  123.          }
  124.          if(ava_end.makeup_eyeline1._alpha < 100)
  125.          {
  126.             ava_end.makeup_eyeline1._alpha += 10;
  127.             ava_makeups[3] = ava_end.makeup_eyeline1._alpha;
  128.          }
  129.          else
  130.          {
  131.             ava_end.makeup_eyeline1._alpha = 100;
  132.             ava_makeups[3] = ava_end.makeup_eyeline1._alpha;
  133.          }
  134.       }
  135.    }
  136.    else if(s_makeup == 3)
  137.    {
  138.       if(_l1._xmouse > 70 && _l1._xmouse < 200 && (_l1._ymouse > 240 && _l1._ymouse < 370))
  139.       {
  140.          so6.start();
  141.          if(ava_end.ava_lip._currentframe != ava_end.ava_lip.select_color)
  142.          {
  143.             ava_end.ava_lip.gotoAndStop(ava_end.ava_lip.select_color);
  144.             ava_end.ava_lip._alpha = 0;
  145.          }
  146.          makeup_hand.lips.gotoAndPlay(2);
  147.          if(ava_end.ava_lip._alpha < 100)
  148.          {
  149.             ava_end.ava_lip._alpha += 10;
  150.             ava_makeups[1] = ava_end.ava_lip._alpha;
  151.          }
  152.          else
  153.          {
  154.             ava_end.ava_lip._alpha = 100;
  155.             ava_makeups[1] = ava_end.ava_lip._alpha;
  156.          }
  157.       }
  158.    }
  159.    else if(s_makeup == 4)
  160.    {
  161.       if(_l1._xmouse > 40 && _l1._xmouse < 280 && (_l1._ymouse > 150 && _l1._ymouse < 300))
  162.       {
  163.          so6.start();
  164.          if(ava_end.mas._currentframe < 6)
  165.          {
  166.             ava_end.mas.nextFrame();
  167.             ava_makeups[2] = ava_end.mas._currentframe;
  168.          }
  169.          makeup_hand.mas.gotoAndPlay(2);
  170.       }
  171.    }
  172.    else if(s_makeup == 5)
  173.    {
  174.       makeup_hand.eraser.gotoAndPlay(2);
  175.       if(e_num_flag == 0)
  176.       {
  177.          if(_l1._xmouse > 20 && _l1._xmouse < 220 && (_l1._ymouse > 145 && _l1._ymouse < 300))
  178.          {
  179.             so6.start();
  180.             if(ava_end.ava_makeup_face._alpha > 0)
  181.             {
  182.                ava_end.ava_makeup_face._alpha -= 10;
  183.                ava_makeups[0] = ava_end.ava_makeup_face._alpha;
  184.             }
  185.             else
  186.             {
  187.                ava_end.ava_makeup_face._alpha = 0;
  188.                ava_makeups[0] = ava_end.ava_makeup_face._alpha;
  189.             }
  190.          }
  191.       }
  192.       else if(e_num_flag == 4)
  193.       {
  194.          if(_l1._xmouse > 40 && _l1._xmouse < 250 && (_l1._ymouse > 150 && _l1._ymouse < 250))
  195.          {
  196.             so6.start();
  197.             if(ava_end.makeup_eyeline0._alpha > 0)
  198.             {
  199.                ava_end.makeup_eyeline0._alpha -= 10;
  200.                ava_makeups[4] = ava_end.makeup_eyeline0._alpha;
  201.             }
  202.             else
  203.             {
  204.                ava_end.makeup_eyeline0._alpha = 0;
  205.                ava_makeups[4] = ava_end.makeup_eyeline0._alpha;
  206.             }
  207.          }
  208.       }
  209.       else if(e_num_flag == 2)
  210.       {
  211.          if(_l1._xmouse > 40 && _l1._xmouse < 190 && (_l1._ymouse > 150 && _l1._ymouse < 250))
  212.          {
  213.             so6.start();
  214.             ava_end.mas.prevFrame();
  215.             ava_makeups[2] = ava_end.mas._currentframe;
  216.          }
  217.       }
  218.       else if(e_num_flag == 3)
  219.       {
  220.          if(_l1._xmouse > 40 && _l1._xmouse < 250 && (_l1._ymouse > 150 && _l1._ymouse < 250))
  221.          {
  222.             so6.start();
  223.             if(ava_end.makeup_eyeline1._alpha > 0)
  224.             {
  225.                ava_end.makeup_eyeline1._alpha -= 10;
  226.                ava_makeups[3] = ava_end.makeup_eyeline1._alpha;
  227.             }
  228.             else
  229.             {
  230.                ava_end.makeup_eyeline1._alpha = 0;
  231.                ava_makeups[3] = ava_end.makeup_eyeline1._alpha;
  232.             }
  233.          }
  234.       }
  235.       else if(e_num_flag == 1)
  236.       {
  237.          if(_l1._xmouse > 70 && _l1._xmouse < 200 && (_l1._ymouse > 240 && _l1._ymouse < 370))
  238.          {
  239.             so6.start();
  240.             if(ava_end.ava_lip._alpha > 0)
  241.             {
  242.                ava_end.ava_lip._alpha -= 10;
  243.                ava_makeups[1] = ava_end.ava_lip._alpha;
  244.             }
  245.             else
  246.             {
  247.                ava_end.ava_lip._alpha = 0;
  248.                ava_makeups[1] = ava_end.ava_lip._alpha;
  249.             }
  250.          }
  251.       }
  252.    }
  253. };
  254. Mouse.addListener(mouse_down);
  255. makeup_lip_bt.onRollOver = function()
  256. {
  257.    this.gotoAndPlay(2);
  258.    so2.start();
  259.    makeup_hand._visible = false;
  260.    Mouse.show();
  261. };
  262. makeup_lip_bt.onRollOut = function()
  263. {
  264.    this.gotoAndStop(1);
  265.    if(s_makeup != undefined)
  266.    {
  267.       makeup_hand._visible = true;
  268.       Mouse.hide();
  269.    }
  270. };
  271. makeup_lip_bt.onRelease = function()
  272. {
  273.    so2.start();
  274.    mas_close();
  275.    makeup_set.gotoAndStop(3);
  276.    makeup_hand.gotoAndStop(4);
  277.    s_makeup = 3;
  278.    powder_cmaker();
  279.    hand_show();
  280. };
  281. makeup_mas_bt.onRollOver = function()
  282. {
  283.    so2.start();
  284.    this.gotoAndPlay(2);
  285.    so3.start();
  286.    makeup_hand._visible = false;
  287.    Mouse.show();
  288. };
  289. makeup_mas_bt.onRollOut = function()
  290. {
  291.    this.gotoAndStop(1);
  292.    if(s_makeup != undefined)
  293.    {
  294.       makeup_hand._visible = true;
  295.       Mouse.hide();
  296.    }
  297. };
  298. makeup_mas_bt.onRelease = function()
  299. {
  300.    so2.start();
  301.    mas_close();
  302.    makeup_set.gotoAndStop(1);
  303.    makeup_hand.gotoAndStop(5);
  304.    s_makeup = 4;
  305.    hand_show();
  306. };
  307. makeup_eyeline0_bt.onRollOver = function()
  308. {
  309.    this.gotoAndPlay(2);
  310.    so2.start();
  311.    makeup_hand._visible = false;
  312.    Mouse.show();
  313. };
  314. makeup_eyeline0_bt.onRollOut = function()
  315. {
  316.    this.gotoAndStop(2);
  317.    if(s_makeup != undefined)
  318.    {
  319.       makeup_hand._visible = true;
  320.       Mouse.hide();
  321.    }
  322. };
  323. makeup_eyeline0_bt.onRelease = function()
  324. {
  325.    so2.start();
  326.    mas_close();
  327.    makeup_set.gotoAndStop(4);
  328.    makeup_hand.gotoAndStop(2);
  329.    s_makeup = 1;
  330.    powder_cmaker();
  331.    hand_show();
  332. };
  333. makeup_eyeline1_bt.onRollOver = function()
  334. {
  335.    this.gotoAndPlay(2);
  336.    so2.start();
  337.    makeup_hand._visible = false;
  338.    Mouse.show();
  339. };
  340. makeup_eyeline1_bt.onRollOut = function()
  341. {
  342.    this.gotoAndStop(2);
  343.    if(s_makeup != undefined)
  344.    {
  345.       makeup_hand._visible = true;
  346.       Mouse.hide();
  347.    }
  348. };
  349. makeup_eyeline1_bt.onRelease = function()
  350. {
  351.    so2.start();
  352.    mas_close();
  353.    makeup_set.gotoAndStop(4);
  354.    makeup_hand.gotoAndStop(3);
  355.    s_makeup = 2;
  356.    powder_cmaker();
  357.    hand_show();
  358. };
  359. mas_close = function()
  360. {
  361.    if(mas_open_flag)
  362.    {
  363.       so2.start();
  364.       mas_open_flag = false;
  365.       ava_mas_pad.gotoAndPlay(11);
  366.    }
  367.    epad_close();
  368. };
  369. epad_close = function()
  370. {
  371.    if(e_open_flag)
  372.    {
  373.       so9.start();
  374.       e_open_flag = false;
  375.       makeup_erase_pad.gotoAndPlay(11);
  376.    }
  377. };
  378. powder_cmaker = function()
  379. {
  380.    var _l1 = this;
  381.    var _l3 = _root;
  382.    var _l2 = 0;
  383.    while(_l2 < 6)
  384.    {
  385.       if(s_makeup == 0)
  386.       {
  387.          _l3.makeup_set["ava_face_c" + _l2].onRelease = function()
  388.          {
  389.             ava_end.ava_makeup_face.select_color = parseInt(this._name.slice(10,11)) + 2;
  390.             makeup_hand.powder.m.gotoAndStop(parseInt(this._name.slice(10,11)) + 2);
  391.          };
  392.       }
  393.       else if(s_makeup == 1 || s_makeup == 2)
  394.       {
  395.          _l3.makeup_set["ava_mas_c" + _l2].onRelease = function()
  396.          {
  397.             var _l1 = this;
  398.             if(s_makeup == 1)
  399.             {
  400.                ava_end.makeup_eyeline0.select_color = parseInt(_l1._name.slice(9,10)) + 2;
  401.                makeup_hand.back.m.gotoAndStop(parseInt(_l1._name.slice(9,10)) + 1);
  402.             }
  403.             if(s_makeup == 2)
  404.             {
  405.                ava_end.makeup_eyeline1.select_color = parseInt(_l1._name.slice(9,10)) + 2;
  406.                makeup_hand.point.m.gotoAndStop(parseInt(_l1._name.slice(9,10)) + 1);
  407.             }
  408.          };
  409.       }
  410.       else if(s_makeup == 3)
  411.       {
  412.          _l3.makeup_set["ava_lip_c" + _l2].onRelease = function()
  413.          {
  414.             ava_end.ava_lip.select_color = parseInt(this._name.slice(9,10)) + 1;
  415.             makeup_hand.lips.m.gotoAndStop(parseInt(this._name.slice(9,10)) + 1);
  416.          };
  417.       }
  418.       _l2++;
  419.    }
  420. };
  421. var e_open_flag = false;
  422. e_open.onRelease = function()
  423. {
  424.    if(!e_open_flag)
  425.    {
  426.       e_open_flag = true;
  427.       makeup_erase_pad.gotoAndPlay(2);
  428.    }
  429.    else
  430.    {
  431.       e_open_flag = false;
  432.       makeup_erase_pad.gotoAndPlay(11);
  433.    }
  434.    if(mas_open_flag)
  435.    {
  436.       mas_open_flag = false;
  437.       ava_mas_pad.gotoAndPlay(11);
  438.    }
  439. };
  440. e_open.onRollOver = function()
  441. {
  442.    so2.start();
  443.    makeup_hand._visible = false;
  444.    Mouse.show();
  445. };
  446. e_open.onRollOut = function()
  447. {
  448.    if(s_makeup != undefined)
  449.    {
  450.       makeup_hand._visible = true;
  451.       Mouse.hide();
  452.    }
  453. };
  454. var e_num_flag;
  455. var i = 0;
  456. while(i < 5)
  457. {
  458.    _root.makeup_erase_pad.e_pad["e_pad" + i].onRelease = function()
  459.    {
  460.       mas_close();
  461.       s_makeup = 5;
  462.       e_num_flag = this._name.slice(5,6);
  463.       e_open_flag = false;
  464.       makeup_erase_pad.gotoAndPlay(11);
  465.       makeup_hand.gotoAndStop(6);
  466.       hand_show();
  467.    };
  468.    _root.makeup_erase_pad.e_pad["e_pad" + i].onRollOver = function()
  469.    {
  470.       makeup_hand._visible = false;
  471.       Mouse.show();
  472.    };
  473.    _root.makeup_erase_pad.e_pad["e_pad" + i].onRollOut = function()
  474.    {
  475.       if(s_makeup != undefined)
  476.       {
  477.          makeup_hand._visible = true;
  478.          Mouse.hide();
  479.       }
  480.    };
  481.    i++;
  482. }
  483.